Optimal. Leaf size=40 \[ \frac {(2 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \sec (e+f x) \tan (e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {4131, 3855}
\begin {gather*} \frac {(2 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \tan (e+f x) \sec (e+f x)}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 4131
Rubi steps
\begin {align*} \int \sec (e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\frac {b \sec (e+f x) \tan (e+f x)}{2 f}+\frac {1}{2} (2 a+b) \int \sec (e+f x) \, dx\\ &=\frac {(2 a+b) \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \sec (e+f x) \tan (e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 48, normalized size = 1.20 \begin {gather*} \frac {a \tanh ^{-1}(\sin (e+f x))}{f}+\frac {b \tanh ^{-1}(\sin (e+f x))}{2 f}+\frac {b \sec (e+f x) \tan (e+f x)}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 55, normalized size = 1.38
method | result | size |
derivativedivides | \(\frac {a \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+b \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}\) | \(55\) |
default | \(\frac {a \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+b \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}\) | \(55\) |
norman | \(\frac {\frac {b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {b \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {\left (2 a +b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 f}+\frac {\left (2 a +b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2 f}\) | \(93\) |
risch | \(-\frac {i b \left ({\mathrm e}^{3 i \left (f x +e \right )}-{\mathrm e}^{i \left (f x +e \right )}\right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) a}{f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) b}{2 f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) a}{f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) b}{2 f}\) | \(118\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 62, normalized size = 1.55 \begin {gather*} \frac {{\left (2 \, a + b\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (2 \, a + b\right )} \log \left (\sin \left (f x + e\right ) - 1\right ) - \frac {2 \, b \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1}}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.26, size = 78, normalized size = 1.95 \begin {gather*} \frac {{\left (2 \, a + b\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (2 \, a + b\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, b \sin \left (f x + e\right )}{4 \, f \cos \left (f x + e\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \sec {\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 60, normalized size = 1.50 \begin {gather*} \frac {{\left (2 \, a + b\right )} \log \left ({\left | \sin \left (f x + e\right ) + 1 \right |}\right ) - {\left (2 \, a + b\right )} \log \left ({\left | \sin \left (f x + e\right ) - 1 \right |}\right ) - \frac {2 \, b \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1}}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.41, size = 41, normalized size = 1.02 \begin {gather*} \frac {\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\,\left (a+\frac {b}{2}\right )}{f}-\frac {b\,\sin \left (e+f\,x\right )}{2\,f\,\left ({\sin \left (e+f\,x\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________